package com.yhy.tcpserver.inbound;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/**
 * describe:
 *
 * @author helloworldyu
 * @data 2018/3/14
 */
public class FirstInboundChannel extends ChannelInboundHandlerAdapter{
	@Override
	public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
		System.out.println("==================firstinbound===================");
		ByteBuf byteBuf = (ByteBuf) msg;
		String hexDump = ByteBufUtil.hexDump(byteBuf);
		System.out.println(hexDump);
		//msg 没有处理掉还得向下传。
		super.channelRead(ctx,msg);
	}
}